<nav class="top-nav">
  <div class="width-limit">
    <a class="logo" href="/">
      <img src="{{imgPath}}/logo.png" style="height: 40px;">
      <span class="logo-name">米粒</span>
    </a>
    <ul class="navbar-nav">
      <li {% if reqPath === '/' %}class="navbar-nav-select"{% endif %}><a href="/" style="padding-left: 0;">首页</a></li>
      <li {% if reqPath.startsWith('/boiling') %}class="navbar-nav-select"{% endif %}><a href="/boilings/recommend">沸点</a></li>
      <!-- <li {% if reqPath.startsWith('/handbooks') %}class="navbar-nav-select"{% endif %}><a href="/handbooks">小册</a></li> -->
      <li {% if reqPath.startsWith('/books') %}class="navbar-nav-select"{% endif %}><a href="/books">开源图书</a></li>
      <li id="topnavsearch" class="search">
        <form>
          <input id="" type="text" value="" autocomplete="off" placeholder="搜索" class="search-input"/>
          <a class="search-btn" href="javascript:void(0)"><i class="iconfont ic-search"></i></a>
        </form>
      </li>
    </ul>

    <div class="navbar-user">
        {% if not user %}
        <a href="/signin" class="btn navbar-signin">登录</a>
        <a href="/signup" class="btn navbar-signup">注册</a>
        {% endif %}
    </div>

    <a class="btn write-btn" href="/editor/drafts/new" target="_blank">
      <i class="iconfont ic-write"></i>写文章
    </a>
  </div>
</nav>